UNPKG

1.22 kBSource Map (JSON)View Raw
1{"version":3,"file":"KeepAwake.js","sourceRoot":"","sources":["../src/KeepAwake.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,EAAE,iBAAiB,EAAE,GAAG,aAAa,CAAC;AAE5C,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,KAAK,CAAC,aAAa;IAIxD,iBAAiB;QACf,iBAAiB,CAAC,QAAQ,EAAE,CAAC;IAC/B,CAAC;IAED,oBAAoB;QAClB,iBAAiB,CAAC,UAAU,EAAE,CAAC;IACjC,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC;IACd,CAAC;;AAbM,kBAAQ,GAAG,QAAQ,CAAC;AACpB,oBAAU,GAAG,UAAU,CAAC;AAejC,MAAM,UAAU,QAAQ;IACtB,iBAAiB,CAAC,QAAQ,EAAE,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,UAAU;IACxB,iBAAiB,CAAC,UAAU,EAAE,CAAC;AACjC,CAAC","sourcesContent":["import React from 'react';\nimport { NativeModules } from 'react-native';\n\nconst { ExponentKeepAwake } = NativeModules;\n\nexport default class KeepAwake extends React.PureComponent {\n static activate = activate;\n static deactivate = deactivate;\n\n componentDidMount() {\n ExponentKeepAwake.activate();\n }\n\n componentWillUnmount() {\n ExponentKeepAwake.deactivate();\n }\n\n render() {\n return null;\n }\n}\n\nexport function activate(): void {\n ExponentKeepAwake.activate();\n}\n\nexport function deactivate(): void {\n ExponentKeepAwake.deactivate();\n}\n"]}
\No newline at end of file